package com.hssy.wululuaplan.controller;


import com.hssy.wululuaplan.common.Result;
import com.hssy.wululuaplan.entity.SysUser;
import com.hssy.wululuaplan.service.SysUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 系统用户 前端控制器
 * </p>
 *
 * @author Mr.Hongtao
 * @since 2025-06-18
 */
@RestController
@RequestMapping("/wululuaplan/sys-user")
public class SysUserController {

    @Resource
    private SysUserService sysUserService;
    @GetMapping("/getUserInfo")
    public Result<SysUser> getUserInfo(@RequestHeader("Authorization") String token){
        SysUser sysUser = sysUserService.getUserInfo(token);
        return Result.success(sysUser);
    }
}

